package com.qysoft.dtkj.dtkj_gl.actions.widget;

import java.util.HashMap;

import com.jfinal.aop.Before;
import com.qysoft.rapid.actions.RapidAction;
import com.qysoft.rapid.core.RapidDbConn;
import com.qysoft.rapid.dao.mybatis.RapidDao;
import com.qysoft.rapid.domain.Bean;

public class WidgetAction extends RapidAction{

	@Before(RapidDbConn.class)
	public void infoDetailIndex() throws Exception{
		String id = getPara("id");
		HashMap<String, Object> infoDetail = RapidDao.selectOneByXml("infoDetail_select", id);
		setAttr("infoDetail", infoDetail);
		renderJsp("/WEB-INF/pages/widget/infoDetail.jsp");
	} 
	
	@Before(RapidDbConn.class)
	public void zcfgDetailIndex() throws Exception {
		Bean bean = getBean();
		HashMap<String, Object> infoDetail = RapidDao.selectOneByXml("queryZcfgDetail", bean);
		setAttr("infoDetail", infoDetail);
		renderJsp("/WEB-INF/pages/widget/infoDetail.jsp");
	}
	
	public void pushIndex() throws Exception{
		String infoid = getPara("infoid");
		setAttr("infoid", infoid);
		bindCurrentRyxxToPage();
		renderJsp("/WEB-INF/pages/widget/push.jsp");
	}
	
}
